package BatchTools::FileGen::Format::Delimited;

##########################################
#
# Copyright 2008 David B. Spadea
# All rights reserved
#
# http://www.spadea.net
#
# This program and all supporting code  
# is released under the terms of the 
# GNU General Public License version 3.
#
##########################################

sub init
{
	return "<report>\n";
}

sub format
{
	my $colnames = shift;
	my $arryref = shift;
	my $data;

	$data = "\t<record>\n";

	map {
		my $val = shift @{ $arryref };
		$data .= "\t\t<$_>$val</$val>\n";
	} @{ $colnames };

	$data .= "\t</record>\n";

	return \$data;
}

sub finish
{
	return "</report>\n";
}
1;
